Browse Source

fix casting and shadow issues

master
Odilitime 5 years ago
parent
commit
e25a030748
  1. 8
      src/graphics/components/TabbedComponent.cpp

8
src/graphics/components/TabbedComponent.cpp

@ -174,7 +174,7 @@ void TabbedComponent::addTab(std::string passedTitle) { @@ -174,7 +174,7 @@ void TabbedComponent::addTab(std::string passedTitle) {
// if we're in a tab
if (this->mpSelectedTab) {
// set tab
TextComponent *textComponent = dynamic_cast<TextComponent*>(this->mpSelectedTab->titleBox.get());
TextComponent *textComponent = this->mpSelectedTab->titleBox.get();
if (textComponent) {
// similar to loadDomIntoTab
textComponent->text = url;
@ -218,10 +218,10 @@ void TabbedComponent::addTab(std::string passedTitle) { @@ -218,10 +218,10 @@ void TabbedComponent::addTab(std::string passedTitle) {
newTab->history = std::make_unique<BrowsingHistory>([this](URL const& goToURL) {
std::cout << "history goto " << goToURL << std::endl;
std::shared_ptr<DocumentComponent> docComponent = std::static_pointer_cast<DocumentComponent>(this->documentComponent);
if (docComponent) {
std::shared_ptr<DocumentComponent> p_docComponent = std::static_pointer_cast<DocumentComponent>(this->documentComponent);
if (p_docComponent) {
// now tell it to navigate somewhere
docComponent->navTo(goToURL.toString());
p_docComponent->navTo(goToURL.toString());
}
//this->win->navTo(goToURL.toString());
});

Loading…
Cancel
Save