Changeset View
Standalone View
krusader/panelmanager.cpp
Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Line(s) | 259 | if(nextTo && nextTo->gui) { | |||
---|---|---|---|---|---|
262 | // settings directly would add too much complexity. | 262 | // settings directly would add too much complexity. | ||
263 | QString grpName = "PanelManager_" + QString::number(qApp->applicationPid()); | 263 | QString grpName = "PanelManager_" + QString::number(qApp->applicationPid()); | ||
264 | krConfig->deleteGroup(grpName); // make sure the group is empty | 264 | krConfig->deleteGroup(grpName); // make sure the group is empty | ||
265 | KConfigGroup cfg(krConfig, grpName); | 265 | KConfigGroup cfg(krConfig, grpName); | ||
266 | 266 | | |||
267 | nextTo->gui->saveSettings(cfg, true); | 267 | nextTo->gui->saveSettings(cfg, true); | ||
268 | // reset undesired duplicated settings | 268 | // reset undesired duplicated settings | ||
269 | cfg.writeEntry("Properties", 0); | 269 | cfg.writeEntry("Properties", 0); | ||
270 | p->restoreSettings(cfg); | 270 | p->restoreSettings(cfg); | ||
martinkostolny: I think, the fix can be done like this with no additional code:
```
if (nextTo->virtualPath() ! | |||||
The reason I choose too not just call start is that start changes the jumpback point. Another issue that is less important is that if start is called with an invalid url, then it navigates to the homefolder. This makes sense for a new tab, because it has to show something. If openUrl is called from an existing tab with an invalid url it does nothing, because it makes more sense to continue showing the folder we are already in. rade: The reason I choose too not just call start is that start changes the jumpback point. Another… | |||||
I'm not quite sure I understand the if statement. Is the purpose of 'nextTo->virtualPath() != url' just checking that the url we are trying to open is not the url we are already at? If it is why would it be bad to open it again? Screwing up the back button or something? rade: I'm not quite sure I understand the if statement. Is the purpose of 'nextTo->virtualPath() !=… | |||||
Please correct me if I'm wrong but it seems that jumpback point is reset for every new tab that is created (duplicated or not). Even with your diff the jumpback point of the parent tab is not transferred to the new one. I have to be missing something. Anyway I find that as an expected behaviour but I'm not explicitly against changing that :). As for the invalid url argument, fair enough :). ad purpose of the if statment: It was there simple in order to not call code that is not necessary to call again. Right I think there probably aren't any bad consequences, I just thought it is logically cleaner this way. martinkostolny: Please correct me if I'm wrong but it seems that jumpback point is reset for every new tab that… | |||||
271 | krConfig->deleteGroup(grpName); | 271 | krConfig->deleteGroup(grpName); | ||
272 | } | 272 | } | ||
273 | else | | |||
274 | p->start(url); | 273 | p->start(url); | ||
275 | } | 274 | } | ||
276 | 275 | | |||
277 | void PanelManager::slotNewTab() | 276 | void PanelManager::slotNewTab() | ||
278 | { | 277 | { | ||
279 | slotNewTab(QUrl::fromLocalFile(QDir::home().absolutePath())); | 278 | slotNewTab(QUrl::fromLocalFile(QDir::home().absolutePath())); | ||
280 | _currentPanel->slotFocusOnMe(); | 279 | _currentPanel->slotFocusOnMe(); | ||
281 | } | 280 | } | ||
▲ Show 20 Lines • Show All 182 Lines • Show Last 20 Lines |
I think, the fix can be done like this with no additional code:
...instead of line 270.
Please correct me if I've missed something.