Feature 17#256
Merged
highperformancecoder merged 3 commits intohighperformancecoder:masterfrom Dec 17, 2020
Merged
Conversation
… more tricky because I don't know how to calculate size accurately if it is not in editor mode
Contributor
Author
|
I either have to use the Godley table in its editor form, then it has its title and can be selected on the Godley tab very precisely, but then the Godley table also has to be in editor mode on the main canvas... OR, I can use GodleyTableWindow instead, via a "new GodleyTableWindow". But in this case I can't get the title positioned nicely above the table or get its dimensions correct in itemAt(x,y), even though the table displays nicely. I'm stumped... |
| { | ||
| public: | ||
| bool itemSelector(ItemPtr i) override {if (auto g=dynamic_cast<GodleyIcon*>(i.get())) {return g->editorMode();}; return false;} | ||
| bool itemSelector(ItemPtr i) override {if (dynamic_cast<GodleyIcon*>(i.get())) return true; return false;} |
There was a problem hiding this comment.
Or even simpler: "return i;"
| } else cairo_translate(cairo,itemCoords[it].first,itemCoords[it].second); | ||
| g->draw(cairo); | ||
| } else cairo_translate(cairo,itemCoords[it].first,itemCoords[it].second); | ||
| auto godley=GodleyTableWindow(g); |
There was a problem hiding this comment.
Cleaner would be GodleyTableWindow godley(g); The above may invoke an unnecessary copy constructor.
highperformancecoder
added a commit
that referenced
this pull request
Dec 27, 2024
… summary tab. For feature #256.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I tried using the simpler [] assign operator to populate itemCoords, but the coordinates do not persist when I do so and revert to the values on the original canvas after moving a plot or Godley table on the tab.
This change is