Meaning of のかと思ったら


In a short story I'm reading, I found this sentece:

> ちゃんとした手術をする **のかと思ったら** 、獣医さんはその場で切開を始めた

I guess 「の」 nominalizes the preceding sentence, but I'm not sure about the
meaning if 「かと思ったら」. I found it can have [rhetorical or softening
usage](https://japanese.stackexchange.com/questions/29822/difference-
between-%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99-and-%E3%81%8B%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99),
and it can mean ["just when"](https://japanesetest4you.com/flashcard/learn-
jlpt-n2-grammar-%E3%81%8B%E3%81%A8%E3%81%8A%E3%82%82%E3%81%A3%E3%81%9F%E3%82%89%E3%81%8B%E3%81%A8%E3%81%8A%E3%82%82%E3%81%86%E3%81%A8-ka-
to-omottaraka-to-omou-to/), but neither seems to apply in this case.

I think that means the veterinary is going to do a proper surgery and he
begins an incision, but I'm not sure about that construction's meaning.




> ちゃんとした手術をするのかと思ったら、獣医さんはその場で切開を始めた

かと思ったら here is not a question, the か is being used as speculation, so it means
something like "I thought he would..." or "I imagined he would..."

> I think that means the veterinary is going to do a proper surgery and he
> begins an incision, but I'm not sure about that construction's meaning.

That そのば means "right there and then" and we're contrasting with the idea of
ちゃんとした手術, "proper surgery", before that, so it looks more like "While I was
thinking that he would do a proper surgery, the vet cut (him) open there and
then", in other words the speaker was expecting an operation done in the
operating theatre with sterilized equipment and masks and things, but the vet
just whipped out a scalpel and started cutting at the scene.




> ちゃんとした手術をするのかと思ったら、獣医さんはその場で切開を始めた

かと思ったら here is not a question, the か is being used as speculation, so it means
something like "I thought he would..." or "I imagined he would..."

> I think that means the veterinary is going to do a proper surgery and he
> begins an incision, but I'm not sure about that construction's meaning.

That そのば means "right there and then" and we're contrasting with the idea of
ちゃんとした手術, "proper surgery", before that, so it looks more like "While I was
thinking that he would do a proper surgery, the vet cut (him) open there and
then", in other words the speaker was expecting an operation done in the
operating theatre with sterilized equipment and masks and things, but the vet
just whipped out a scalpel and started cutting at the scene.

