Skip to content

Conversation

@PixelPirate
Copy link

This pull request adds a new option Show tabbar to the options menu. (Also fixes a crash with MongoWorker)

option

When the tabbar is disabled, a single left click on a collection displays it's contents in the main window.

This is usefull if Robomongo is just used to browse through a database since double clicking a collection will open the tree view children beneath the collection, making the tree view on the left side more and more cluttered.

tree view

The Show tabbar option is on by default which will result in the same behaviour as traditionally Robomongo has.


I made this addition primarily because I found Robomongo a bit unplesant when just browsing though collections. I had to double click collections to display them which would also open their subtree in the tree view, so I had to make an additional click to collapse the subtree again. Then after a while I would get quite a lot of taps on the top because I never closed the tabs because clicking on the items in tree view was just more intuitive for me then searching for the collection in the tabbar.

I know that the tabbar is important, so this PR will leave the tabbar on by default. But this PR adds the option to turn the tabbar off and enable a simpler and more intuitive way to use Robomongo for simple use cases.


This PR also fixes a bug in MongoWorker. When closing a MongoShell (By closing a Tab), some objects where destroyed while the thread would still try to send messages to them, resulting in a crash. There where also some problems associated with the deletion of the QThread object, the parent object of the QThread was wrongfully set to the MongoWorker (should be the other way around if anything) resulting in the deletion of locked mutexes which in some cases also caused a crash.

A crash can be reproduced when connecting to a server and very quickly opening a collection and immediately closing it's tab and quickly repeating with different collections. I used the keyboard shortcut to close the tabs. Localhost will also be too fast, I'm connected to a Amazon server which takes about 1-2 seconds to load a collection.

@schetnikovich
Copy link
Contributor

@PixelPirate, thank you for this pull request! Because of recent activity in v0.9 branch, two branches (v0.9 and master) diverged a bit, and I'm doing merge manually. Actually, branch v0.9 already merged with master. All activity will now be in master.

Today master branch contains really important fix for incorrect and unsafe shutdown of MongoWorker. Your implementation of this fix without any significant modifications merged with master branch. Thank you for finding time to solve this non trivial problem!

Your improvement when browsing collections is really interesting. I like it! I will work to merge it in a second step. Right now we are focused on shipping 0.9.0 RC to all platforms. We have a list of critical issues that have higher priority. Will be back to tabbar in couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants