Bug report #7520
Stop browser from resetting when Save is clicked or new project is opened
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | GUI | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 16467 |
Description
Currently the browser resets whenever the user clicks Save. All entries are collapsed and the user has to navigate to the work folders again - and again - and again.
Related issues
Associated revisions
don't reload the whole browser model when the project home changes (fixes #7520)
History
#1 Updated by Anita Graser over 11 years ago
- Priority changed from Normal to Severe/Regression
This is a regression.
#2 Updated by Etienne Tourigny over 11 years ago
QgsBrowserDockWidget::showEvent() has the following code, which is responsible:
connect( QgsProject::instance(), SIGNAL( readProject( const QDomDocument & ) ), mModel, SLOT( reload() ) ); connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ), mModel, SLOT( reload() ) ); connect( QgisApp::instance(), SIGNAL( newProject() ), mModel, SLOT( reload() ) );
This means that browser is reload when reading/saving/creating project.
This is to ensure the "Project home" entry is created. However, one has to wonder why reload() needs to be triggered on all these.
Fix to this would be one of
1) create "Project home" item without calling reload() - this could be in a new slot setHome() instead of reload()
2) save open items and re-open them, which is probably more involved.
I am adding Jurgen as watcher, as he is the author of this feature, implemented in 73dc9b19be9e156328261f5416c58e2dba09cdf7
"Include project home in browser toplevel browser (implement #6955)"
#3 Updated by Etienne Tourigny over 11 years ago
- File project-home.txt added
attaching a patch which attempts to fix this bug. However, it is buggy and probably just needs a simple fix. Maybe Jurgen has an idea.
It works if project folder is not opened before project is changed.
#4 Updated by Jürgen Fischer over 11 years ago
- Status changed from Open to Closed
Fixed in changeset fa0a9b75fe2509d287730bc0450ddde9f59c94f6.
#5 Updated by Etienne Tourigny over 11 years ago
- Status changed from Closed to Reopened
I get a crash after saving project, this happens if you open the project home folder in browser, close it and save project in another dir.
Also, I think it would be better to use running directory as default project home, instead of $HOME (which is available as second root item anyway)
Debug: src/core/qgsbrowsermodel.cpp: 446: (fetchMore) path = /data/tmp [New Thread 0x7fffc5bcb700 (LWP 23291)] [New Thread 0x7fffc8303700 (LWP 23292)] [Thread 0x7fffc8303700 (LWP 23292) exited] [Thread 0x7fffc5bcb700 (LWP 23291) exited] Debug: src/core/qgsproject.cpp: 417: (dump_) current properties: Debug: src/core/qgsprojectproperty.cpp: 299: (dump) name: properties Debug: src/core/qgsprojectproperty.cpp: 329: (dump) key: <SpatialRefSys> subkey: <SpatialRefSys> Debug: src/core/qgsprojectproperty.cpp: 299: (dump) name: SpatialRefSys Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <ProjectCrs> value: EPSG:4326 Debug: src/core/qgsprojectproperty.cpp: 329: (dump) key: <Paths> subkey: <Paths> Debug: src/core/qgsprojectproperty.cpp: 299: (dump) name: Paths Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <Absolute> value: false Debug: src/core/qgsprojectproperty.cpp: 329: (dump) key: <Gui> subkey: <Gui> Debug: src/core/qgsprojectproperty.cpp: 299: (dump) name: Gui Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <SelectionColorBluePart> value: 0 Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <CanvasColorGreenPart> value: 204 Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <CanvasColorRedPart> value: 204 Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <SelectionColorRedPart> value: 255 Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <SelectionColorAlphaPart> value: 255 Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <SelectionColorGreenPart> value: 255 Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <CanvasColorBluePart> value: 204 Debug: src/core/qgsprojectproperty.cpp: 329: (dump) key: <PositionPrecision> subkey: <PositionPrecision> Debug: src/core/qgsprojectproperty.cpp: 299: (dump) name: PositionPrecision Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <DecimalPlaces> value: 2 Debug: src/core/qgsprojectproperty.cpp: 321: (dump) key: <Automatic> value: true Debug: src/core/qgsproject.cpp: 1038: (write) there are 4 property scopes Program received signal SIGSEGV, Segmentation fault. 0x00007ffff2d3b81c in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 (gdb) bt #0 0x00007ffff2d3b81c in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #1 0x00007ffff2d3b95d in QSortFilterProxyModel::mapToSource(QModelIndex const&) const () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #2 0x00007ffff2d3a996 in QSortFilterProxyModel::flags(QModelIndex const&) const () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #3 0x00007ffff2cb81de in QAbstractItemView::focusInEvent(QFocusEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #4 0x00007ffff27ff464 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #5 0x00007ffff2baeb66 in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #6 0x00007ffff2c2e82b in QAbstractScrollArea::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #7 0x00007ffff2cc3d8b in QAbstractItemView::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #8 0x00007ffff27afe9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #9 0x00007ffff27b430a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #10 0x00007ffff459af7e in QgsApplication::notify (this=0x7fffffffd250, receiver=0x134e930, event=0x7fffffffc040) at //data/src/qgis/qgis-master/src/core/qgsapplication.cpp:237 #11 0x00007ffff340856e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #12 0x00007ffff27ae84e in QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #13 0x00007ffff27f2eeb in QWidget::setFocus(Qt::FocusReason) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #14 0x00007ffff27b4030 in QApplication::setActiveWindow(QWidget*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #15 0x00007ffff282d70c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #16 0x00007ffff2854fa2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #17 0x00007fffef69bab5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #18 0x00007fffef69bde8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #19 0x00007fffef69bea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #20 0x00007ffff3436bf6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #21 0x00007ffff2854c1e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #22 0x00007ffff34072bf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #23 0x00007ffff3407548 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #24 0x00007ffff340c708 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #25 0x000000000054f6a5 in main (argc=1, argv=0x7fffffffd528) at //data/src/qgis/qgis-master/src/app/main.cpp:997
#6 Updated by Matthias Kuhn over 11 years ago
- Status changed from Reopened to Feedback
#7931 seems to be related and is fixed since yesterday. Can this one be closed as well?
#7 Updated by Paolo Cavallini over 11 years ago
I'm getting the crash with 1.9.0+git20130614+07ea0aa~unstable1
#8 Updated by Matthias Kuhn over 11 years ago
1.9.0+git20130614+07ea0aa~unstable1 is from 2013/06/14.
The fix (fec833f) was introduced later (2016/06/15).
#9 Updated by Paolo Cavallini over 11 years ago
Agreed, seems fixed now.
#10 Updated by Jürgen Fischer over 11 years ago
- Resolution set to fixed
- Status changed from Feedback to Closed